package com.cskaoyan.controller.lzp_controller;

import com.cskaoyan.bean.BaseRespVo;
import com.cskaoyan.bean.lzp.Order;

import com.cskaoyan.bean.lzp.UserWxIndexVO;
import com.cskaoyan.lz_service.UserService;

import org.apache.shiro.SecurityUtils;
import org.apache.shiro.subject.Subject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * \* Description:
 * \* @author: Lizhanpeng
 * \* Date: 2022/5/8
 * \
 */
@RestController
@RequestMapping("wx/user")
public class WxUserController {


    @Autowired
    UserService service;

    @GetMapping("index")
    public BaseRespVo userWxIndex() {
        Subject subject = SecurityUtils.getSubject();
        Integer id = (Integer) subject.getPrincipals().getPrimaryPrincipal();

        UserWxIndexVO userWxIndexVO = service.userWxIndex(id);
        return BaseRespVo.listOk(userWxIndexVO);
    }



}
